<!-- 教学管理-校园管理-教育局资料 -->
<template>
  <div class="JNPF-common-layout">
    <div class="JNPF-common-layout-center">
      <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent>
          <el-col :span="6">
            <el-form-item label="教育局名称">
              <el-input v-model="listQuery.fcatname" placeholder="请输入编号或名称" clearable />
            </el-form-item>
          </el-col>

          <el-col :span="6">
            <el-form-item label="所属地区">
              <el-select v-model="listQuery.fcustomno" placeholder="请选择"
                :disabled="$store.getters.userInfo.manufacturer">
                <el-option
                  v-for="item in options3"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="">
              <el-button type="primary" icon="el-icon-search" @click="getlist">查询</el-button>
              <!-- <el-button type="success" icon="el-icon-plus" @click="insert(undefined)">新增</el-button> -->
              <!-- <el-button type="warning" icon="el-icon-upload2">导入</el-button> -->
            </el-form-item>
          </el-col>
        </el-form>
      </el-row>
      <div class="JNPF-common-layout-main JNPF-flex-main">
        <JNPF-table :data="list" border v-loading="loading">
          <el-table-column prop="FCATNO" label="教育局编号" width="95"></el-table-column>
          <el-table-column prop="FCATNAME" label="教育局名称"></el-table-column>
          <el-table-column prop="FAREA" label="所属地区"></el-table-column>
          <el-table-column prop="FUSER" label="负责人"></el-table-column>
          <el-table-column prop="FTEL" label="电话号码"></el-table-column>
          <!-- <el-table-column prop="FEMAIL" label="电子邮箱"></el-table-column> -->
          <el-table-column prop="FPARENTNO" label="教育局地址"></el-table-column>
          <!-- <el-table-column prop="FVISIBLE" label="是否显示"  width="95">
            <template slot-scope="scope">
              {{ scope.row.FVISIBLE | dynamicText(fvisiblelist) }}
            </template>
          </el-table-column> -->
          <el-table-column fixed="left" label="操作" width="105">
            <template slot-scope="scope">
              <el-button @click.native.prevent="insert(scope.row.FCATNO)" icon="el-icon-view" type="text" size="small">
                查看
              </el-button>
              <!-- <el-popconfirm title="确定删除当前数据吗？" @confirm="Catdelete(scope.row.FCATNO)">
                <el-button slot="reference" icon="el-icon-delete" style="color: red;margin-left: 10px;"
                  type="text">删除</el-button>
              </el-popconfirm> -->
            </template>
          </el-table-column>
        </JNPF-table>
        <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" />
        <Form ref="Form" :parelist="list" />
      </div>
    </div>
  </div>
</template>

<script>
  import Form from "./Form.vue"
  export default {
    name: 'shop',
    components: { Form },
    data() {
      return {
        fvisiblelist: [
          { id: "1", fullName: "是" },
          { id: "2", fullName: "否" },
        ],
        options3: [{
          value: '20E01',
          label: '北京市'
        }, {
          value: '20E02',
          label: '上海市'
        }, {
          value: '20N01',
          label: '天津市'
        }, {
          value: '20N02',
          label: '重庆市'
        }],
        total: 0,
        list: [
        {
          "FCATNO": "ZF101",
          "FCATNAME": "黄浦区教育局",
          "FPARENTNO": "上海市申北路211号",
          "FAREA":"黄浦区",
          "FUSER":"张校长",
          "FTEL":"021-54429876",
          "FEMAIL":"54429876@qq.com",
          "FSEQNO": 28,
          "FVISIBLE": 1,
          "FIMAGE": null,
          "FOPERATOR": "system",
          "FUPDDATE": "2011-02-16T02:57:02.000+00:00"
        },{
          "FCATNO": "ZF102",
          "FCATNAME": "静安区教育局",
          "FPARENTNO": "上海市普尔路90号",
          "FAREA":"静安区",
          "FUSER":"赵校长",
          "FTEL":"021-67429876",
          "FEMAIL":"67429876@qq.com",
          "FSEQNO": 28,
          "FVISIBLE": 1,
          "FIMAGE": null,
          "FOPERATOR": "system",
          "FUPDDATE": "2011-02-16T02:57:02.000+00:00"
        },{
          "FCATNO": "ZF103",
          "FCATNAME": "宝山教育局",
          "FPARENTNO": "上海市春申路290号",
          "FAREA":"宝山区",
          "FUSER":"王副校长",
          "FTEL":"021-59829876",
          "FEMAIL":"59829876@qq.com",
          "FSEQNO": 28,
          "FVISIBLE": 1,
          "FIMAGE": null,
          "FOPERATOR": "system",
          "FUPDDATE": "2011-02-16T02:57:02.000+00:00"
        },{
          "FCATNO": "ZF104",
          "FCATNAME": "闵行教育局",
          "FPARENTNO": "上海市腾冲路890号",
          "FAREA":"闵行区",
          "FUSER":"李校长",
          "FTEL":"021-59089876",
          "FEMAIL":"59089876@qq.com",
          "FSEQNO": 28,
          "FVISIBLE": 1,
          "FIMAGE": null,
          "FOPERATOR": "system",
          "FUPDDATE": "2011-02-16T02:57:02.000+00:00"
        }
        ],
        loading: false,
        listQuery: {
          page: 1,
          limit: 20,
          sort: "desc",
          sidx: "",
          fcatno: "",
          fcatname: ""
        },
      };
    },
    computed: {},
    created() {
    },
    methods: {
      insert(row) {
        this.$refs.Form.init(row);
      },
    },
  };
</script>